package com.oedtech.esl.repository.sys;

import com.oedtech.esl.model.sys.UserStore;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import javax.transaction.Transactional;

@Repository
public interface UserStoreDao extends JpaRepository<UserStore,Long>{

    @Modifying
    @Transactional
    @Query(value = "delete from sys_user_store where user_id =?1 ")
    int deleteUserRole(Long userId);

}
